#  author:张靖昆 date:2020/3/10 name:04_date类 IDE:PyCharm
# date time  datetime三类

# 第一种导入方式
# import datetime
# a=datetime.date.today()
# print(a)

# 第二种
# from datetime import date
# a=date.today()
# print(a)

# str类型的时间字符转化成datetime.date类型
import datetime
str_time="2020-03-10"
str_newtime=datetime.datetime.strptime(str_time,"%Y-%m-%d").date()
print(type(str_newtime))